/**
 * 压缩京师书法课件包
 *
 * 需要安装以下依赖:
 * npm install jszip
 */

const path = require('path');
const JSZip = require('jszip')
const toolsNode = require('../libs/tools-node');
const password = Buffer.from('l6fwZHdJbU2Y4jxPDwjoI6P9vltHhc8bvDlExm4vRRg=', 'base64');

// 获取传递给脚本的参数（排除前两个默认参数）
const args = process.argv.slice(2);
let from = args[0];
let to = path.dirname(args[0]);

toolsNode.zipFile({
  from: from, to: to, JSZip: JSZip, encryptKey: password
});
